<template>
  <div>
    <h3></h3>
    <ul>
      <li v-for="item in liist" :key="item.id">
        名字:{{ item.name }} 薪资:{{ item.age }}
      </li>
    </ul>
    <button @click="arr">添加</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      liist: [
        {
          id: 1,
          name: "黄士郎",
          age: '999',
        },
        {
          id: 2,
          name: "张麻子",
          age: "666",
        },
      ],
    };
  },
  methods: {
      arr(){
          this.liist.splice(1,0,{
                id:Date.now(),
                name:'老六',
                age:777
          })
      }
  },
};
</script>

<style>
</style>